import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入注册和登陆页面的组件
import Register from '../views/Register/index.vue'
import Login from '../views/Login/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/register',
    component: Register
  },
  {
    path: '/login',
    component: Login
  }
]

const router = new VueRouter({
  mode: 'history',
  // base: process.env.BASE_URL,//路由的基地址,一般不需要,因为如果加上了它每次配置地址前都得再加它的地址
  routes
})

export default router
